README file for "Accountability from Cyberspace? Scandal Exposure on the Internet and Official Governance in China" 

Shuo Chen and Yiran Li
Updated: Jan 1, 2023



Instructions:

Code file 01-03:
Replication requires Stata.  No need to change anything on the do file. It should be possible to run it as is to produce all tables and graphs in the manuscript. 
The replication files were compiled using Stata 14 on a Windows 10 computer with 16 GB of RAM. 

Code file 04.analysis.R
Replication requires R 4.2.1
For best results, restart R using Ctrl+shift+F10 (Windows and Linux) before running script.
And then enter Ctrl+Shift+Enter (Windows and Linux) to run all the lines. 



Code files (4):


1. 01_analysis.do
   - Replication do file for Tables 1,2,3,4,5, and the data (statistical summary) used in Figure 1 & 2. #The replication of figure 1 and 2 will be shown in 04.analysis.r. Part of the variable discription of Table 2 will be shown in 02_analysis
   - this file uses 01_main.dta
   - the log file is included as 01_analysis.log 

2. 02_analysis.do 
   - Replication do file for Table 6 and one variable statistical summary of Table 2
   - this file uses 02_panel.dta
   - the log file is included as 02_analysis.log 

3. 03_analysis.do 
   - Replication do file for Table 7
   - this file uses 03_externality.dta
   - the log file is included as 03_analysis.log 

4. 04_analysis.R
   - Replication R script for Figures 1,2, A2, and A3.
   - this file uses 04_Figure_discipline.csv, 04_Figure_response.csv, 04_Restricted_Sample.csv, 04_Figure_Distribution.csv, and 04_Figure_Comparison.csv
   - the log file is included as 04_analysis.log 




Data files (8): 
1. 01_main.dta: this dataset shows all variables on the scandals exposed online including officials' names, position, rank, the number of reposts online, the type of scandals, etc. 

2. 02_panel.dta: this dataset is a panel dataset including the rainfall variables, officials' names, position, rank etc. for IV estimation. 

3. 03_externality.dta: this dataset includes scandals from Annual Report on Public Opinion in China (2010�V2014) for externality check. 

4. 04_Figure_discipline.csv, 04_Figure_response.csv, 04_Restricted_Sample.csv: they are datasets on the statistical summary results. 

5. 04_Figure_Distribution.csv, and 04_Figure_Comparison.csv: They are datasets on the statistical summary we used in Appendix. 


Output Figures (4)

They are PDF files of the figures. 









